# coding: utf-8
from flask_sqlalchemy import SQLAlchemy


db = SQLAlchemy()



class WorkerInfo(db.Model):
    __tablename__ = 'workerInfo'

    AutoID = db.Column(db.BigInteger, primary_key=True, info='主键')
    workerID = db.Column(db.BigInteger, nullable=False, index=True, info='维修师傅ID')
    workerName = db.Column(db.String(20), info='维修师傅姓名')
    workerPhone = db.Column(db.String(20), info='维修师傅电话')
    status = db.Column(db.Integer, server_default=db.FetchedValue(), info='维修师傅此时的状态 0表示空闲 1表示已分配')
    isDelete = db.Column(db.Integer, server_default=db.FetchedValue(), info='维修师傅是否离职')
    repairID = db.Column(db.BigInteger, index=True, info='维修正在维修的维修订单外键')
    createTime = db.Column(db.DateTime, server_default=db.FetchedValue())
